#include <REGX52.H>
#include "Nixie.h"
#include "SoleKey.h"
#include "Motor.h"

unsigned char KeyNum;

void main()
{
	Motor_Init();
	LightNixieTube(1, 0);
	while(1)
	{
		KeyNum = SoleKey();//获取键码值
		if(KeyNum)
		{
			if(KeyNum == 1){ Motor_SetSpeed(0); }	//设置比较值，改变PWM占空比
			if(KeyNum == 2){ Motor_SetSpeed(50); }
			if(KeyNum == 3){ Motor_SetSpeed(75); }
			if(KeyNum == 4){ Motor_SetSpeed(100); }
			LightNixieTube(1, KeyNum);
		}
		
	}
}
